import request from '@/utils/request'
import { addCampusIdToQuery } from '@/api/home/management'

// 查询快捷入口列表
export function listEntries(query) {
  return request({
    url: '/quick/entries/list',
    method: 'get',
    params: addCampusIdToQuery(query)
  })
}

// 查询快捷入口详细
export function getEntries(id) {
  return request({
    url: '/quick/entries/' + id,
    method: 'get'
  })
}

// 新增快捷入口
export function addEntries(data) {
  return request({
    url: '/quick/entries',
    method: 'post',
    data: data
  })
}

// 修改快捷入口
export function updateEntries(data) {
  return request({
    url: '/quick/entries',
    method: 'put',
    data: data
  })
}

// 删除快捷入口
export function delEntries(id) {
  return request({
    url: '/quick/entries/' + id,
    method: 'delete'
  })
}
